<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.6.2/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.6.2/js/bootstrap.min.js"></script>
</head>
<body>
<input id="i1" type="text">+
<input id="i2" type="text">=
<input id="i3" type="text">
<input id="btn" type="button" value="提交">
</body>
<script>
    let $i3 = $("#i3")
    $('#btn').click(function () {
        $.ajax({
            url: "",
            type: "post",
            data: {
                a: $("#i1").val(),
                b: $("#i2").val()
            },
            dataType: 'json',
            success: function (res) {
                console.log(res)
                $i3.val(res.sum_num)
            }
        })
    })
</script>
</html>